<div class="modal-header">
    <a class="close" ng-click="close()">&times;</a>

    <div class="input-prepend input-append">
        <h4>新增IP</h4>
    </div>
</div>
<div class="modal-body">
    <div class="tab-style">
        <ul class="nav nav-tabs tab-ul">
            <li class="active"><a href="#tabl1" data-toggle="tab" ng-click="tab1_click()">批量增加</a></li>
            <li><a href="#tabl2" data-toggle="tab" ng-click="tab2_click()">单个增加</a></li>
        </ul>
    </div>

    <div id="tabl1" ng-show="tab1_show">
        <form class="form-horizontal" name="type_form1" ng-submit="do_upsert()">
            <div class="control-group">
                <label for="name" class="control-label">开始IP：</label>
                <div class="controls">
                    <input type="text" ng-model="fixedip.start" class="input-small" ipcheck required/>
                </div>
            </div>

            <div class="control-group">
                <label for="name" class="control-label">结束IP：</label>
                <div class="controls">
                    <input type="text" ng-model="fixedip.end" class="input-small" ipcheck required/>
                </div>
            </div>

            <div style="text-align: center;">
                <span style="display:none; color:red" ng-show="type_form1.$error.ipcheck">非法的IP地址格式!</span>
            </div>

            <div class="modal-footer">
                <span style="padding-right: 230px;color: red;" ng-show="error">{{ error }}</span>
                <a data-dismiss="modal" class="btn" ng-click="close()">关闭</a>

                <button type="submit" ng-disabled="!type_form1.$valid" class="btn btn-primary">保存</button>
            </div>
        </form>
    </div>

    <div id="tabl2" ng-show="tab2_show">
        <form class="form-horizontal" name="type_form2" ng-submit="do_upsert()">
            <div class="control-group">
                <label for="name" class="control-label">IP地址：</label>
                <div class="controls">
                    <input type="text" ng-model="fixedip.ipaddress" class="input-small" ipcheck required/>
                </div>
            </div>

            <div style="text-align: center;">
                <span style="display:none; color:red" ng-show="type_form2.$error.ipcheck">非法的IP地址格式!</span>
            </div>

            <div class="modal-footer">
                <span style="padding-right: 230px;color: red;" ng-show="error">{{ error }}</span>
                <a data-dismiss="modal" class="btn" ng-click="close()">关闭</a>

                <button type="submit" ng-disabled="!type_form2.$valid" class="btn btn-primary">保存</button>
            </div>
        </form>
    </div>
</div>